﻿/******************************************************************************
 * Copyright (C) 2015  671643387@qq.com
 *
 * This program is free software; you can redistribute it and/or modify it
 * under the terms of the GNU General Public License as published by the
 * Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
 * more details.
 *
 * You should have received a copy of the GNU General Public License along
 * with this program; if not, write to the Free Software Foundation, Inc.,
 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
 *
 *****************************************************************************/

#ifndef UGAME_BASE_CONSOLE_H_
#define UGAME_BASE_CONSOLE_H_

#if defined(_MSC_VER) && (_MSC_VER >= 1200)
# pragma once
#endif

#include <UGame/Platform.h>
#if defined(PLATFORM_WINDOWS)
#include <UGame/Base/Console_WIN32.h>
#elif defined(PLATFORM_LINUX)
#include <UGame/Base/Console_POSIX.h>
#endif

namespace UGame {
namespace Console {

    typedef ColorImpl Color;
    typedef GuardImpl Guard;

    enum Type {
        STDOUT,
        STDERR
    };

    void SetColor(int _Type, int _Color);
    void info(const char *_Format, ...);
    void warning(const char *_Format, ...);
    void error(const char *_Format, ...);

}}

#define ULOCK_CONSOLE   UGame::Console::Guard _GuardConsole

#endif // UGAME_BASE_CONSOLE_H_
